package playon.manager;

import playon.playlist.*;
import java.util.*;
import javax.ejb.*;

public class ManagerBean implements SessionBean {

  private Vector playlists;

  /* manipulation de la playlist */

  public void addPlaylist(Playlist playlist) {
    this.playlists.addElement(playlist);
  }

  public Playlist getPlaylist(int i) {
    if((i <= 0) || (i>this.playlists.size()))
      return null;
    else
      return (Playlist)this.playlists.elementAt(i);
  }

  /* implementation de SessionBean */

  public void ejbCreate() {
    this.playlists = new Vector();
  }

  public void ejbRemove() {}

  public void ejbActivate() {}

  public void ejbPassivate() {}

  public void setSessionContext(SessionContext ctx) {}

}

